package com.bodu.depress.controller;

import com.bodu.client.DepressCollectClient;
import com.bodu.core.entity.result.Result;
import com.bodu.depress.entity.DepressQuestionDataVo;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 题目管理
 */
@RestController
@RequestMapping("/api/depress-question")
public class DepressQuestionApiController {

    @Autowired
    private DepressCollectClient depressCollectClient;

    @ApiModelProperty("得到可用的题集")
    @GetMapping("findDepressQuestions/{collectId}")
    public Result<List<DepressQuestionDataVo>> findDepressCollects(@PathVariable("collectId") Long collectId) {
        return depressCollectClient.findDepressCollects(collectId);
    }
}
